<html>
<head><meta charset="utf-8"><title>Safe transmutes · wg-secure-code · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/index.html">wg-secure-code</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/topic/Safe.20transmutes.html">Safe transmutes</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="183769688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146229-wg-secure-code/topic/Safe%20transmutes/near/183769688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Shnatsel <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/topic/Safe.20transmutes.html#183769688">(Dec 18 2019 at 17:13)</a>:</h4>
<p>There is a fairly active effort to come up with a safe transmute API, see <a class="stream" data-stream-id="216762" href="/#narrow/stream/216762-project-safe-transmute">#project-safe-transmute</a> <br>
There is also a pre-RFC <a href="https://internals.rust-lang.org/t/pre-rfc-v2-safe-transmute/11431" target="_blank" title="https://internals.rust-lang.org/t/pre-rfc-v2-safe-transmute/11431">here</a> and someone is drafting an RFC. <br>
This would be nice to see - right now we have 5 incompatible crates for the job, each with its own downsides</p>



<a name="183769916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146229-wg-secure-code/topic/Safe%20transmutes/near/183769916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Shnatsel <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/topic/Safe.20transmutes.html#183769916">(Dec 18 2019 at 17:15)</a>:</h4>
<p>In fact this is big enough to warrant its own repo: <a href="https://github.com/rust-lang/project-safe-transmute" target="_blank" title="https://github.com/rust-lang/project-safe-transmute">https://github.com/rust-lang/project-safe-transmute</a></p>



<a name="183771344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146229-wg-secure-code/topic/Safe%20transmutes/near/183771344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tony Arcieri <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/topic/Safe.20transmutes.html#183771344">(Dec 18 2019 at 17:32)</a>:</h4>
<p>neat</p>



<a name="184424920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146229-wg-secure-code/topic/Safe%20transmutes/near/184424920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Shnatsel <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/topic/Safe.20transmutes.html#184424920">(Dec 29 2019 at 15:21)</a>:</h4>
<p>The <code>typic</code> crate is pushing the envelope on what kind of transmutes are possible in safe Rust: <a href="https://www.reddit.com/r/rust/comments/eh67wi/typic_safe_zerocost_transmutations/" target="_blank" title="https://www.reddit.com/r/rust/comments/eh67wi/typic_safe_zerocost_transmutations/">https://www.reddit.com/r/rust/comments/eh67wi/typic_safe_zerocost_transmutations/</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>